package com.sprite.support.wechat.utils.model;

import java.util.HashMap;
import java.util.Map;

public class TemplateMessage {

	private String touser;
	
	private String templateId;
	private String url;
	private Miniprogram miniprogram;
	private String shortId;
	
	private Map<String, Text> data = new HashMap<>();
	
	public String getShortId() {
		return shortId;
	}


	public void setShortId(String shortId) {
		this.shortId = shortId;
	}


	public String getTouser() {
		return touser;
	}


	public void setTouser(String touser) {
		this.touser = touser;
	}


	public String getTemplateId() {
		return templateId;
	}


	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public Map<String, Text> getData() {
		return data;
	}

	public void addText(String key, Text text) {
		data.put(key, text);
	}

	public void setData(Map<String, Text> data) {
		this.data = data;
	}

	public Miniprogram getMiniprogram() {
		return miniprogram;
	}


	public void setMiniprogram(Miniprogram miniprogram) {
		this.miniprogram = miniprogram;
	}


	public static class Text {
		private String value;
		private String color;
		
		public Text(String value, String color) {
			super();
			this.value = value;
			this.color = color;
		}

		public String getValue() {
			return value;
		}

		public void setValue(String value) {
			this.value = value;
		}

		public String getColor() {
			return color;
		}

		public void setColor(String color) {
			this.color = color;
		}
		
	}
	
	public static class Miniprogram {
		private String appid;
		private String pagepath;
		
		public Miniprogram(String appid, String pagepath) {
			super();
			this.appid = appid;
			this.pagepath = pagepath;
		}
		public String getAppid() {
			return appid;
		}
		public void setAppid(String appid) {
			this.appid = appid;
		}
		public String getPagepath() {
			return pagepath;
		}
		public void setPagepath(String pagepath) {
			this.pagepath = pagepath;
		}
	}
}
